import { PlusOutlined } from '@ant-design/icons';
import {
  Button,
 

  Form,
  Input,
  message,
  Upload,
} from 'antd';
import { useState } from 'react';

export default function mine() {
  const onFinish =  (values) => {
    console.log(values);
    }
    const props = {
      name: 'avatar',
      action: 'http://jacklv.cn/users/uploadProfile',
      headers: {
        token:localStorage.token
      },
      onChange(info) {
        if (info.file.status !== 'uploading') {
          console.log(info);
        }
        if (info.file.status === 'done') {
          console.log(123);
          message.success(`${info.file.name} file uploaded successfully`);
        } else if (info.file.status === 'error') {
          message.error(`${info.file.name} file upload failed.`);
        }
      },
    };
  return (
    <>
    
    <Form
      labelCol={{
        span: 4,
      }}
      wrapperCol={{
        span: 14,
      }}
      layout="horizontal"
      disabled={false}
      style={{
        maxWidth: 600,
      }}
      onFinish={onFinish}
    >
      
     
      <Form.Item label="Input" name="password">
        <Input />
      </Form.Item>
      
      
      
     
      
      
      
      
      <Form.Item label="Upload" >
        <Upload {...props} listType="picture-card">
          <div>
            <PlusOutlined />
            <div
              style={{
                marginTop: 8,
              }}
            >
              Upload
            </div>
          </div>
        </Upload>
      </Form.Item>
      <Form.Item label="Button">
        <Button htmlType="submit">Button</Button>
      </Form.Item>
    </Form>
  </>
  )
}
